<!DOCTYPE html>
<html>
<head>
    <title>领料单详细</title>
    #parse("sys/header.html")
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <i-form ref="formValidate" :model="materialRecord" :rules="ruleValidate" :label-width="80" v-if="flag!=1">
            <Row>
                <i-col span="11">
                    <Form-item label="物料编码" prop="spareCode">
                        <i-input v-model="materialRecord.spareCode" placeholder="物料编码" readonly icon="md-arrow-dropdown-circle" @on-click="getToolsInfo"></i-input>
                    </Form-item>
                </i-col>
                <i-col span="11">
                    <Form-item label="物料名称" prop="spareName">
                        <i-input v-model="spareName" placeholder="物料名称" readonly icon="md-arrow-dropdown-circle" @on-click="getToolsInfo"></i-input>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="7">
                    <Form-item label="库存数量" prop="storeNum">
                        <i-input v-model="storeNum" placeholder="库存数量" number readonly/>
                    </Form-item>
                </i-col>
                <i-col span="7">
                    <Form-item label="锁定数量" prop="num">
                        <i-input v-model="locNum" placeholder="锁定数量" number readonly />
                    </Form-item>
                </i-col>
                <i-col span="7">
                    <Form-item label="领用数量" prop="num">
                        <i-input v-model="materialRecord.num" placeholder="领用数量" number :minlength="1" />
                    </Form-item>
                </i-col>
            </Row>
            <Form-item>
                #if($shiro.hasPermission("materialbase:save"))
                <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
                #end
                <!--<i-button type="warning" @click="reload" style="margin-left: 8px"/>返回</i-button>-->
            </Form-item>
        </i-form>

    </div>

    <Card v-show="showList">
        <Row :gutter="16" style="margin: 8px 0px 0px 1px">
            <div class="search-group">
                <i-col span="4">
                    <i-input v-model="q.spareCode" @on-enter="query" placeholder="工装编码"/>
                </i-col>
                <i-button @click="query">查询</i-button>
                <i-button @click="reloadSearch">重置</i-button>
            </div>
        </Row>
        <Row :gutter="16" style="margin: 3px 0px 0px 0px;">
            <div class="buttons-group" v-if="flag!=1">
                #if($shiro.hasPermission("materialbase:save"))
                <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
                #end
            </div>
        </Row>
        <table id="jqGrid"></table>
    </Card>
</div>

<script src="${rc.contextPath}/js/tools/materialrecord.js?_${date.systemTime}"></script>
</body>
</html>
